import { request } from './axios-config'

export function getMyTaskData(params){
  return request({
    url: '/sys/multiple/event/app/accept/page',
    params,
    method: 'get'
  })
}
export function getMyGroupData(params){
  return request({
    url: '/sys/multiple/event/app/accept/group/page',
    params,
    method: 'get'
  })
}

export function getMyReportData(params){
  return request({
    url: '/sys/multiple/event/app/report/page',
    params,
    method: 'get'
  })
}
//   处置列表
export function getHandleList(params){
  return request({
    url: '/sys/multiple/event/app/record/page',
    params,
    method: 'get'
  })
}

export function getEventDetail(params){
  return request({
    url: '/sys/multiple/event/app/detail',
    params,
    method: 'get'
  })
}

export function getLogDetail(params){
  return request({
    url: '/sys/multiple/event/app/logs',
    params,
    method: 'get'
  })
}

export function handleToDeal(data){
  return request({
    url: '/sys/multiple/event/app/accept',
    method: 'put',
    data: data
  })
}

export function getHandleWay(){
  return request({
    method: 'get',
    url: '/sys/multiple/handle/actions'
  })
}

export function getDocList(params){
  return request({
    url: '/sys/multiple/proof/writs/unbound',
    method: 'get',
    params
  })
}

export function getDocData(params) {
  return request({
    url: '/sys/multiple/event/writs',
    method: 'get',
    params
  })
}

export function getGroupList() {
  return request({
    url: '/sys/multiple/groups',
    method: 'get'
  })
}


export function getGroupUser(params) {
  return request({
    url: '/sys/multiple/group/users',
    method: 'get',
    params
  })
}

export function getVideoInfo(params){
  return request({
    url: '/sys/multiple/event/app/videos',
    method: 'get',
    params
  }).then(res=>{
    if(res && res.data){
      return Promise.resolve(JSON.parse(res.data))
    }else{
      Promise.resolve({data: {rows: []}})
    }
  })
}

export function bindInfo(data){
  return request({
    url: '/sys/multiple/event/accept/binding',
    method: 'put',
    data
  })
}


